﻿using System.Collections.Generic;

namespace CubeCube.Tile.Rule
{
    public class TileActionRule
    {
        public enum ActionType
        {
            CLICKED = 0,   //点击
            TOUCHED,
            DESTROYED, //销毁
            DAMAGED,   //受伤害
            ONFIRE,    //着火
            CREATED,   //创建
            TIMEOUT,   //超时
            HIT_FLOOR, //落地
            COUNT
        }

        public ActionType action;
        public List<TileRule> rules;

        public void AddRule(TileRule rule)
        {
            if(this.rules == null)
            {
                this.rules = new List<TileRule>();
            }
            this.rules.Add(rule);
        }

        //TODO: 序列化
    }
}
